-- cmd_do_compound
-- Create by panyl
-- 合成

function Operation.cmd_do_compound(ruleId, count, hasCompounded)
    -- 客户端自行合成
    if not hasCompounded then
        if not CompoundM.doCompound(ruleId, "compound", count) then
            return;
        end
    end

    local amount = count or 1;

    --记录起来，需要进行同步
    local v = { ["rule_id"] = ruleId, ["amount"] = amount, };
    SyncM.addMessage("CMD_COMPOUND", v);

    -- TODO:
    SyncM.startSync();
end
